import request from '@/util/request'

export const add_Category = (data) => {
    return request({
        url: '/category/addCategory',
        method: 'post',
        data,
    })
}

export const getList_Category = () => {
    return request({
        url: '/category/listCategory',
        method: 'get'
    })
}

export const delete_Category = (id) => {
    return request({
        url: '/category/deleteCategory/' + id,
        method: 'delete'
    })
}

export const detail_Category = (id) => {
    return request({
        url: '/category/getDetailCategory/' + id,
        method: 'get'
    })
}
export const update_Category = (data) => {
    return request({
        url: '/category/updateCategory',
        method: 'put',
        data: data
    })
}
